package com.param;

import java.util.concurrent.atomic.AtomicInteger;

public class Request {
	private Integer id;
	public static final AtomicInteger nid = new AtomicInteger(0);
	
	private String command;
	private Object content;
	
	public Request() {
		super();
		try
		{
			this.id = nid.incrementAndGet();
		}
		catch (Exception e) {
			this.id = nid.getAndSet(0);
		}
		
	}
	
	public Integer getId() {
		return id;
	}

	public String getCommand() {
		return command;
	}
	public void setCommand(String command) {
		this.command = command;
	}
	public Object getContent() {
		return content;
	}
	public void setContent(Object content) {
		this.content = content;
	}
	@Override
	public String toString() {
		return "Request [command=" + command + ", content=" + content + "]";
	}
	
	

}
